Repository navigation
State the surface of the service route by route - #87
Merged
Merged
Conversation
api/surface.json is the surface of the service: for every operation the route table holds, its method and path, the conformance class it is a requirement of or that it is an extension, and the functions MobilityDB declares that its handler applies. A server has no object layer for a binding's matrix to read, so the service states its surface itself. ats_surface_test.go writes it and holds it to the code. The functions of a route are read from the source: every SQL call in a string literal its handler reaches, through the package functions and variables it names (tProps among them, whose expressions the query route applies), kept to the names the generated tables state MobilityDB declares. The route table and the router name every handler and answer nothing, so the walk does not enter them. A handler is the innermost named function of its runtime name, since Go names the closure edrQuery returns, inlined into routeTable, routeTable.edrQuery.func1. go test -run TestSurfaceIsWhatTheServiceApplies -update-surface rewrites the file. Measured. go test passes; the 45 routes reach the functions their handlers apply (the TemporalGeometrySequence asMFJSON over sequenceN, the query route interp, cumulativeLength and speed, the coverage rasterUnion, each EDR query asCoverageJSON), the health check none; a surface with one function removed fails the test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
api/surface.json is the surface of the service: for every operation the
route table holds, its method and path, the conformance class it is a
requirement of or that it is an extension, and the functions MobilityDB
declares that its handler applies. A server has no object layer for a
binding's matrix to read, so the service states its surface itself.
ats_surface_test.go writes it and holds it to the code. The functions of a
route are read from the source: every SQL call in a string literal its
handler reaches, through the package functions and variables it names
(tProps among them, whose expressions the query route applies), kept to the
names the generated tables state MobilityDB declares. The route table and the
router name every handler and answer nothing, so the walk does not enter
them. A handler is the innermost named function of its runtime name, since
Go names the closure edrQuery returns, inlined into routeTable,
routeTable.edrQuery.func1. go test -run TestSurfaceIsWhatTheServiceApplies
-update-surface rewrites the file.
Measured. go test passes; the 45 routes reach the functions their handlers
apply (the TemporalGeometrySequence asMFJSON over sequenceN, the query route
interp, cumulativeLength and speed, the coverage rasterUnion, each EDR query
asCoverageJSON), the health check none; a surface with one function removed
fails the test.